<?php
	$nom = $_REQUEST["nom"];
	if (strlen($nom))
	{
		$script = '../scripts/'.$nom.'.php';
		$html = '../html/'.$nom.'.html';
		$tpl = file_get_contents('tpl/c.tpl');
		$tpl = str_replace('##nom##', $nom, $tpl);
		if (!is_file($script) && !is_file($html))
		{
			@touch($script);
			@touch($html);
			@chmod($script, 0755);
			@chmod($html, 0755);
			$fp = fopen($script, 'a');
			fwrite($fp, $tpl);
			fclose($fp);
		}
	}
?>